﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;
using System.Windows.Media;
using KBS8.Shared;

namespace KBS8.Presentation.MapView.DrawHandler
{
    public abstract class DrawHandler
    {
        /// <summary>
        /// The successor in the chain of responsibility
        /// </summary>
        protected DrawHandler Successor;
        /// <summary>
        /// The pen to use when drawing
        /// </summary>
        protected Pen Pen;

        /// <summary>
        /// Handles map data or passes it on to another DrawHandler
        /// </summary>
        /// <param name="data">The map data to handle</param>
        /// <param name="dc">The DrawingContext to draw on</param>
        public abstract void Handle(MapTile data, ref DrawingContext dc);
        /// <summary>
        /// Sets the successor in the chain
        /// </summary>
        /// <param name="successor">the successor in the chain</param>
        public void SetSuccessor(DrawHandler successor)
        {
            this.Successor = successor;
        }
    }
}
